﻿@model WebUI.Models.QizTemplate
@using (Ajax.BeginForm(new AjaxOptions()
{
    LoadingElementId="OnLoadingSpan",UpdateTargetId = "SuiFangTemplateFormView",
    InsertionMode = InsertionMode.Replace,
    HttpMethod = "Post",
    OnSuccess = "$('#dialogbox').dialog('close');",
    OnFailure = "OnSiteError"
}))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>@Model.Catalog.Title\随访模板</legend>
        @Html.HiddenFor(model => model.QizFormTemplateID)
        @Html.HiddenFor(model => model.CatalogID)
        <table>
            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.Title)
                    </div>
                </td>
                <td>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.Title)
                        @Html.ValidationMessageFor(model => model.Title)
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.StatusID)
                    </div>
                </td>
                <td>
                    <div class="editor-field">
                        @Html.EditorFor(model => Model.StatusID, "Status")
                        @Html.ValidationMessageFor(model => model.StatusID)
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.DepID)
                    </div>
                </td>
                <td>
                    <div class="editor-field">
                        @Html.DropDownListFor(model => model.DepID, new SelectList(ViewBag.Departments, "DepartmentID", "DepName"))
                        @Html.ValidationMessageFor(model => model.DepID)
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.ExpireDate)
                    </div>
                </td>
                <td>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.ExpireDate)
                        @Html.ValidationMessageFor(model => model.ExpireDate)
                    </div>
                </td>
            </tr>

            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.DefaultCols)
                    </div>
                </td>
                <td>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.DefaultCols)
                        @Html.ValidationMessageFor(model => model.DefaultCols)
                    </div>
                </td>
            </tr>
        </table>
        <p>
            <input type="submit" value="确定" />
        </p>
    </fieldset>
}